@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');

:root {
    --blue-primary: #1a56db;
    --blue-light: #ebf5ff;
    --blue-dark: #1e429f;
    --gray-light: #f9fafb;
    --gray-border: #e5e7eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Tajawal', sans-serif;
    line-height: 1.6;
    color: #1a202c;
    background-color: #f9fafb;
}

/* Prevent zoom on mobile devices */
input, textarea, select, button {
    font-size: 16px;
}

.wrapper {
    max-width: 100%;
    overflow-x: hidden;
}

.font-geist-mono {
    font-family: monospace;
    font-weight: 500;
}

.container {
    max-width: 1200px;
}

/* Section Styles */
.section-header {
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.section-divider {
    height: 3px;
    width: 80px;
    background: linear-gradient(90deg, var(--blue-primary), var(--blue-light));
    border-radius: 3px;
}

.content-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    border: 1px solid var(--gray-border);
}

/* Table of Contents */
.toc-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background-color: white;
    border: 1px solid var(--gray-border);
    color: #1a202c;
    transition: all 0.2s ease;
    text-decoration: none;
    font-weight: 500;
}

.toc-item:hover {
    background-color: var(--blue-light);
    border-color: #bfdbfe;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.toc-number {
    background-color: var(--blue-primary);
    color: white;
    height: 28px;
    width: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Workflow Diagram */
.workflow-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem;
    width: 100%;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    max-width: 400px;
}

.workflow-node {
    background-color: #3182ce;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.workflow-content {
    flex: 1;
}

.workflow-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: #1a202c;
}

.workflow-desc {
    font-size: 0.75rem;
    color: #4a5568;
}

.workflow-arrow {
    display: flex;
    justify-content: center;
    padding: 0.5rem 0;
}

.workflow-store .workflow-node {
    background-color: #2c7a7b;
}

/* Architecture Diagram */
.architecture-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.arch-layer {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
}

.arch-node {
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    font-size: 0.75rem;
    text-align: center;
    gap: 0.25rem;
}

.arch-client {
    background-color: #ebf8ff;
    border-color: #bee3f8;
}

.arch-api {
    background-color: #f0fff4;
    border-color: #c6f6d5;
}

.arch-service {
    background-color: #fff5f5;
    border-color: #fed7d7;
    min-width: 60px;
    font-size: 0.65rem;
}

.arch-db {
    background-color: #ebf4ff;
    border-color: #c3dafe;
}

.arch-arrow {
    display: flex;
    justify-content: center;
    color: #a0aec0;
}

/* Cards with Icons */
.card-with-icon {
    background-color: white;
    border: 1px solid var(--gray-border);
    border-radius: 0.5rem;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.card-with-icon:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.card-icon-container {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-desc {
    font-size: 0.875rem;
    color: #4a5568;
}

/* Tech Options */
.tech-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid var(--gray-border);
    background-color: white;
}

.tech-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.tech-content h5 {
    font-weight: 600;
    font-size: 0.875rem;
}

.tech-content p {
    font-size: 0.75rem;
    color: #4a5568;
}

/* Features */
.feature-card {
    background-color: white;
    border: 1px solid var(--gray-border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.feature-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.feature-icon {
    background-color: var(--blue-light);
    color: var(--blue-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.feature-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.feature-desc {
    font-size: 0.875rem;
    color: #4a5568;
    line-height: 1.5;
}

/* Non-functional Requirements */
.non-functional-req {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background-color: white;
    border: 1px solid var(--gray-border);
    border-radius: 0.5rem;
}

.nfr-icon {
    background-color: var(--blue-light);
    color: var(--blue-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nfr-content h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.nfr-content p {
    font-size: 0.875rem;
    color: #4a5568;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 15px;
    width: 2px;
    background-color: #e2e8f0;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-marker {
    position: absolute;
    top: 0;
    left: -2rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid var(--blue-primary);
    transform: translateX(50%);
    z-index: 1;
}

.timeline-content {
    background-color: white;
    border: 1px solid var(--gray-border);
    border-radius: 0.5rem;
    padding: 1rem;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.timeline-title {
    font-weight: 600;
    color: var(--blue-primary);
}

.timeline-duration {
    font-size: 0.75rem;
    background-color: var(--blue-light);
    color: var(--blue-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.timeline-list {
    list-style-type: disc;
    padding-left: 1.25rem;
    font-size: 0.875rem;
    color: #4a5568;
}

.timeline-list li {
    margin-bottom: 0.25rem;
}

/* Deliverables */
.deliverable-item {
    background-color: white;
    border: 1px solid var(--gray-border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
}

.deliverable-icon {
    background-color: var(--blue-light);
    color: var(--blue-primary);
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    align-self: flex-start;
}

.deliverable-content {
    flex: 1;
}

.deliverable-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.deliverable-desc {
    font-size: 0.875rem;
    color: #4a5568;
    margin-bottom: 0.75rem;
}

.deliverable-list {
    list-style-type: disc;
    padding-left: 1.25rem;
    font-size: 0.875rem;
    color: #4a5568;
}

.deliverable-list li {
    margin-bottom: 0.25rem;
}

/* Suggestions */
.suggestion-card {
    background-color: white;
    border: 1px solid var(--gray-border);
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.suggestion-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #bfdbfe;
}

.suggestion-icon {
    background-color: var(--blue-light);
    color: var(--blue-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.suggestion-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.suggestion-desc {
    font-size: 0.875rem;
    color: #4a5568;
    margin-bottom: 1rem;
}

.suggestion-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.suggestion-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background-color: var(--blue-light);
    color: var(--blue-primary);
    border-radius: 0.25rem;
}

/* Assumptions */
.assumption-item {
    display: flex;
    gap: 0.75rem;
    background-color: white;
    border: 1px solid var(--gray-border);
    border-radius: 0.5rem;
    padding: 1rem;
}

.assumption-icon {
    background-color: var(--blue-light);
    color: var(--blue-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.assumption-content {
    font-size: 0.875rem;
    color: #4a5568;
}

/* Questions */
.question-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.question-number {
    background-color: var(--blue-primary);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
    align-self: flex-start;
}

.question-content {
    flex: 1;
    background-color: white;
    border: 1px solid var(--gray-border);
    border-radius: 0.5rem;
    padding: 1rem;
}

.question-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: var(--blue-primary);
}

.question-desc {
    font-size: 0.875rem;
    color: #4a5568;
}

/* Button Styles */
.btn-primary {
    background-color: var(--blue-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary:hover {
    background-color: var(--blue-dark);
}

.btn-secondary {
    background-color: white;
    color: var(--blue-primary);
    border: 1px solid var(--gray-border);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: var(--blue-light);
    border-color: #bfdbfe;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.5rem;
    }
    
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-marker {
        left: -1.5rem;
    }
    
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .deliverable-item, .assumption-item {
        flex-direction: column;
    }
    
    .deliverable-icon, .assumption-icon {
        align-self: flex-start;
    }
}

@media print {
    html, body {
        font-size: 10pt;
    }
    
    .wrapper {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    header {
        position: static;
    }
    
    section {
        page-break-inside: avoid;
        margin-bottom: 1cm;
    }
    
    .feature-card, .suggestion-card, .deliverable-item {
        break-inside: avoid;
    }
    
    .btn-secondary {
        display: none;
    }
}
